﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PageA.aspx.cs" Inherits="BugSysSolution.TestPages.PageA" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="../Javascript/jquery-ui-1.8.23.custom.css" rel="stylesheet" />
    <script src="../Javascript/jquery-1.8.0.min.js"></script>
    <script src="../Javascript/jquery-ui-1.8.23.custom.min.js"></script>

</head>
<body>
    <form id="form1" runat="server">
        <div>
            <input type="button" id="btn1" value="button" />
        </div>
        <div id="dialog" style="display: none;height:300px">
            <iframe src="PageB.aspx" height="500" width="500"></iframe>
        </div>
        <div style="border:1px solid red;height:200px;width:200px">
            <input type="text" id="txt1" />
        </div>
    </form>
</body>
</html>
<script type="text/javascript">
    $(function () {
        $("#dialog").dialog({
            autoOpen:true,
            bgiframe: true,
            resizable: false,
            width:500,
            height: 500,
            modal: false,
            overlay: {
                backgroundColor: '#000',
                opacity: 0.5
            }
        });
    })

    function hiddendiv(data) {
        $("#div1").css("display", "none");
        alert("hidden top div");
        oncallback(data);
    }

    function oncallback(data)
    {
        $("#txt1").val(data);
    }

    $("#btn1").click(function () {
        $("#dialog").dialog("open");
    })

    //window.onload = function () {
    //    var divList = document.getElementsByTagName('div');
    //    for (var i = 0; i < divList.length; i++) {
    //        //alert(temp[i].innerHTML);
    //        if (divList[i].getAttribute('role') == 'dialog') {
    //            alert(1);
    //        }
    //    }
    //}
</script>
